<form th:action="@{/admin/m/ext/question/addOption.gsp}" id="optionAddForm" class="form-horizontal" role="form" action="#" method="post">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h4 class="modal-title">新增选项内容</h4>
	</div>
	<div class="modal-body">
		<div class="row">
			<div class="col-md-12">
				<input th:value="${itemId}" name="itemId" type="text" hidden="true"/> 
				<div class="form-group">
					<label class="col-md-3 control-label">内容标题<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<input name="title" placeholder="请输入内容标题" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">选项类型<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<select name="inputField" class="form-control">
							<option value="1">问答题</option>
							<option value="2">选择题</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">得票数<label class="text-danger">*</label>：</label>
					<div class="col-md-7">
						<input name="selectCount" value="0" placeholder="请输入得票数" type="text" class="form-control" />
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-primary" type="submit">
			<strong>提 交</strong>
		</button>
		<button type="button" class="btn btn-default" data-dismiss="modal">
			<strong>关 闭</strong>
		</button>
	</div>
</form>
<script th:inline="javascript">
    /*<![CDATA[*/
    $(function() {
        var rules = {
            title : {
                required : true,
                maxlength : 40
            },
            selectCount : {
                required : true,
                digits:true,
                max : 9999999,
                min : 0
            }
        }
        var messages = {

        }
        tg_formWinAjaxSubmit("commonWin", "optionAddForm", rules, messages, function() {
            myItemTable.refresh();
        });
    });
    /*]]>*/
</script>